export const BUILDING_TYPES = {
  resource: {
    name: '资源建筑',
    upgradeEffects: {
      productionBonus: 1.2, // 每级产量提升20%
      storageBonus: 1.5,    // 每级存储提升50%
    }
  },
  military: {
    name: '军事建筑',
    upgradeEffects: {
      troopsBonus: 1.3,     // 每级部队容量提升30%
      defenseBonus: 1.25,   // 每级防御提升25%
    }
  },
  technology: {
    name: '科技建筑',
    upgradeEffects: {
      researchBonus: 1.15,  // 每级研究速度提升15%
      techBonus: 1.2,       // 每级科技效果提升20%
    }
  }
}

export const BUILDING_TEMPLATES = {
  lumberMill: {
    type: 'resource',
    name: '木材厂',
    baseProduction: 10,     // 基础木材产量/小时
    baseStorage: 1000,      // 基础存储容量
    upgradeTime: 300,       // 基础升级时间(秒)
    resourceCost: {         // 升级资源消耗基数
      gold: 1000,
      wood: 500,
      stone: 300
    }
  },
  quarry: {
    type: 'resource',
    name: '采石场',
    baseProduction: 8,
    baseStorage: 800,
    upgradeTime: 360,
    resourceCost: {
      gold: 1200,
      wood: 600,
      stone: 200
    }
  },
  barracks: {
    type: 'military',
    name: '兵营',
    baseTroops: 5,         // 基础部队容量
    baseDefense: 50,       // 基础防御值
    upgradeTime: 600,
    resourceCost: {
      gold: 1500,
      wood: 800,
      stone: 500
    }
  }
}

// 升级事件系统
export const UPGRADE_EVENTS = {
  onStart: (building) => {
    console.log(`${building.name} 开始升级`)
    // 可以在这里添加升级开始时的特殊效果
  },
  onComplete: (building) => {
    console.log(`${building.name} 升级完成`)
    // 可以在这里添加升级完成时的特殊效果
    
    // 示例：军事建筑升级完成时，临时提升周围建筑防御
    if (building.type === 'military') {
      // 触发防御加成效果
      return {
        type: 'defense_boost',
        duration: 3600, // 1小时
        value: 1.2 // 提升20%防御
      }
    }
    
    return null
  }
}

// 加速道具配置
export const SPEED_UP_ITEMS = [
  {
    id: 'scroll_1h',
    name: '加速卷轴(1小时)',
    value: 3600,
    cost: { diamond: 5 }
  },
  {
    id: 'scroll_8h',
    name: '加速卷轴(8小时)',
    value: 28800,
    cost: { diamond: 35 }
  },
  {
    id: 'scroll_24h',
    name: '加速卷轴(24小时)',
    value: 86400,
    cost: { diamond: 100 }
  }
] 